package cn.scw.project.goods.domain;

import cn.scw.framework.aspectj.lang.annotation.Excel;
import cn.scw.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
/**
 * 商品订单对象 g_commodity_order
 *
 * @author api
 * @date 2020-05-20
 */
public class GCommodityOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String number;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 订单金额 */
    @Excel(name = "订单金额")
    private double money;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private double payMoney;

    /** 订单状态（待付款，待发货，待收货，已完成，售后/退换）——字典表维护 */
    @Excel(name = "订单状态", readConverterExp = "待=付款，待发货，待收货，已完成，售后/退换")
    private String statusCode;

    /** 优惠券id */
    @Excel(name = "优惠券id")
    private Long couponId;

    /** 是否支付 */
    @Excel(name = "是否支付")
    private boolean isPay=false;

    /** 支付方式（0余额支付，1微信支付）——字典表维护 */
    @Excel(name = "支付方式", readConverterExp = "余=额支付，微信支付")
    private String payType;

    /** 支付时间 */
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payDate;

    /** 是否发货 */
    @Excel(name = "是否发货")
    private boolean isSend=false;

    /** 发货时间 */
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sendDate;

    /** 收货地址 */
    @Excel(name = "收货地址")
    private Long addressId;

    /** 物流号 */
    @Excel(name = "物流号")
    private String logisticsNumber;

    /** 买家留言 */
    @Excel(name = "买家留言")
    private String buyerMessage;

    /** 创建日期 */
    @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate=new Date();

    public GCommodityOrder(String number, Long userId, double money,  String statusCode,  boolean isPay, String payType,  boolean isSend,  Long addressId, String buyerMessage) {
        this.number = number;
        this.userId = userId;
        this.money = money;
        this.statusCode = statusCode;
        this.isPay = isPay;
        this.payType = payType;
        this.isSend = isSend;
        this.addressId = addressId;
        this.buyerMessage = buyerMessage;
    }

    public GCommodityOrder() {
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setNumber(String number)
    {
        this.number = number;
    }

    public String getNumber()
    {
        return number;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setMoney(double money)
    {
        this.money = money;
    }

    public double getMoney()
    {
        return money;
    }
    public void setPayMoney(double payMoney)
    {
        this.payMoney = payMoney;
    }

    public double getPayMoney()
    {
        return payMoney;
    }
    public void setStatusCode(String statusCode)
    {
        this.statusCode = statusCode;
    }

    public String getStatusCode()
    {
        return statusCode;
    }
    public void setCouponId(Long couponId)
    {
        this.couponId = couponId;
    }

    public Long getCouponId()
    {
        return couponId;
    }
    public void setIsPay(boolean isPay)
    {
        this.isPay = isPay;
    }

    public boolean getIsPay()
    {
        return isPay;
    }
    public void setPayType(String payType)
    {
        this.payType = payType;
    }

    public String getPayType()
    {
        return payType;
    }
    public void setPayDate(Date payDate)
    {
        this.payDate = payDate;
    }

    public Date getPayDate()
    {
        return payDate;
    }
    public void setIsSend(boolean isSend)
    {
        this.isSend = isSend;
    }

    public boolean getIsSend()
    {
        return isSend;
    }
    public void setSendDate(Date sendDate)
    {
        this.sendDate = sendDate;
    }

    public Date getSendDate()
    {
        return sendDate;
    }
    public void setAddressId(Long addressId)
    {
        this.addressId = addressId;
    }

    public Long getAddressId()
    {
        return addressId;
    }
    public void setLogisticsNumber(String logisticsNumber)
    {
        this.logisticsNumber = logisticsNumber;
    }

    public String getLogisticsNumber()
    {
        return logisticsNumber;
    }
    public void setBuyerMessage(String buyerMessage)
    {
        this.buyerMessage = buyerMessage;
    }

    public String getBuyerMessage()
    {
        return buyerMessage;
    }
    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("number", getNumber())
            .append("userId", getUserId())
            .append("money", getMoney())
            .append("payMoney", getPayMoney())
            .append("statusCode", getStatusCode())
            .append("couponId", getCouponId())
            .append("isPay", getIsPay())
            .append("payType", getPayType())
            .append("payDate", getPayDate())
            .append("isSend", getIsSend())
            .append("sendDate", getSendDate())
            .append("addressId", getAddressId())
            .append("logisticsNumber", getLogisticsNumber())
            .append("buyerMessage", getBuyerMessage())
            .append("createDate", getCreateDate())
            .toString();
    }
}
